Trình soạn thảo văn bản đơn giản Trong C# mới

1 using System;
2 using
System.Collections.Generic;
3 using
System.ComponentModel;
4 using
System.Data;
5 using
System.Drawing;
6 using
System.Linq;
7 using
System.Text;
8 using
System.Windows.Forms;
9 using
System.Speech.Synthesis;
10
11 namespace
Best_Notepad
12 {
13     
public partial class SpeechForm : Form
14     {
15         
public SpeechForm()
16         {
17             InitializeComponent();
18         }
19
20         
private void speakbutton_Click(object sender, EventArgs e)
21         {
//speech syn the sizer
22             SpeechSynthesizer synt =
new SpeechSynthesizer();
23
24             synt.Rate = speedtrackBar.Value;
//speed k lye
25             
//speed k lye
26             synt.Volume = soundtrackBar.Value;
//awaz k lyye
27
28             
if (personcomboBox.Text == "Male") //agr male ha to
29             {
30                 synt.SelectVoiceByHints(VoiceGender.Male);
31             }
32
33             
if (personcomboBox.Text == "Female") //agr female ha to
34             {
35                 synt.SelectVoiceByHints(VoiceGender.Female);
36             
37             }
38
39             synt.Speak(textBox1.Text);
//lazmi ha ye
40         }
41
42         
private void label2_Click(object sender, EventArgs e)
43         {
44             
this.Close();
45             notepad1 obj =
new notepad1();
46             obj.Show();
47         }
48
49         
private void label1_Click(object sender, EventArgs e)
50         {
51
52         }
53     }
54 }


{speech syn the sizer

synt.Rate = speedtrackBar.Value; speed k lye

speed k lye

synt.Volume = soundtrackBar.Value; awaz k lyye

if (personcomboBox.Text == "Male") agr male ha to

if (personcomboBox.Text == "Female") agr female ha to

synt.Speak(textBox1.Text); lazmi ha ye



Gõ tìm kiếm nhanh...